/**
 * 显示极简版的聊天记录内容
 */
import {
  type ChatRecordMap,
  type ChatRecordType as Type,
  chatRecordToText,
} from '@/services/contact-chat'

export default function SimpleChatRecord<T extends Type>(props: { record: ChatRecordMap[T] }) {
  const { record } = props
  const text = chatRecordToText(record)
  return <>
    {!record.isSend && record.groupSenderName ? `${record.groupSenderName}：` : null}
    {text}
  </>
}
